Skip to content

Conversation

vicb
Copy link
Contributor

@vicb vicb commented Sep 18, 2024

No description provided.

@vicb vicb merged commit b42a1fd into main Sep 18, 2024
2 checks passed
@vicb vicb deleted the stream branch September 18, 2024 13:57
if (init) delete init.cache;
if (init) {
delete init.cache;
if (init.body?.__node_stream__ === true) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be fine to do without the custom property and just check instance of Readable:

    if (init) {
      init = {
        ...init,
        cache: undefined,
        body: init.body instanceof Readable ? Readable.toWeb(init.body) : init.body
      }
    }

(at least, these works in my tests so far)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants